﻿using T4UtilityBelt.Serializers;

namespace T4UtilityBelt.DataDesigns
{
    public class KeyProperty : Property
    {
        public KeyProperty()
            : base(EntityModel.KeyType, null, EntityModel.SecondaryKeyType)
        {
        }

        public KeyProperty(string name)
            : base(EntityModel.KeyType, name, EntityModel.SecondaryKeyType)
        {
        }

        public KeyProperty(string propertyType, string name)
            : base(propertyType, name)
        {
        }

        public KeyProperty(string propertyType, string name, string secondaryType)
            : base(propertyType, name, secondaryType)
        {
        }

        public override UxDesigns.Control CreateControl()
        {
            // todo create a control for the KeyProperty
            return null;
        }

        [XIgnore]
        public override bool IsPropertyTypeSpecified
        {
            get
            {
                return EntityModel.KeyType != PropertyType;
            }
        }
    }
}